class Enemy(object):
    def __init__(self):
        self.hp=8     # enemy hp
        self.mov=1    # enemy move
        self.atk=8    # enemy atk
        self.defend=5    # enemy defend
        self.damage=0

    def attack(self,player):
        if abs(a-c)==1 or abs(b-d)==1:
            self.damage=self.atk-player.defend
            player.hp=player.hp-self.damage
            return player.hp
        else:
            print 'so far'
            return Flase
    def isOver(self):
        if self.hp<=0:
            print 'enemy is dead'
            return True
        else:
            return False

